package com.dhj;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.File;


/**
 * @author DaHuaJia
 * @Description 解析文件
 * @Date 2021-11-13 13:57:20
 */
public class TestFile {

    public static void main(String[] args) throws Exception{
        Document doc = Jsoup.parse(new File("D:\\FreeSpace\\2021\\crawler\\secondCrawler\\src\\main\\resources\\ningmeng.html"), "utf8");

        System.out.println(doc.toString());

        String title = doc.getElementsByTag("title").first().text();

        System.out.println(title);
    }

}
